const fp = require('lodash/fp');

const fn1 = fp.flowRight(fp.join('-'), fp.map(fp.toLower), fp.split(' '));

console.log(fn1('HELLO WORD'))